﻿using Budget.Silver.Model;

namespace Budget.Silver.OutcomeServiceReference
{
    public partial class OutcomeOrderData
    {
        public string CategoryName
        {
            get { return Product.Category.Name; }
        }

        public decimal CategorySum { get; set; }

        public override bool Equals(object obj)
        {
            var order = obj as OutcomeOrderData;

            if (order != null)
            {
                return Id == order.Id;
            }

            return false;
        }

        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }
    }
}